{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "Tong Xiaohui|VP/Secretary/IR|Shanghai Haishun New Pharmaceutical Packaging Co Ltd|Bachelor's Degree\n",
      "Cheng Yuan|HEAD：TECHNOLOGY|Chengdu Shenleng Liquefaction Plant Co Ltd|Zhejiang University Graduated\n",
      "10\n",
      "Jakob Fuglede Nielsen|Partner/CFO|Seed Capital Denmark|Arhus University Master's Degree, Economics\n",
      "Masnizam Hisham|CEO:Prasarana Integrated Mgmt & Engg Svcs|Prasarana Malaysia BHD|University Kebangsaan Malaysia LLB\n",
      "Pratima Aiyagari|Manager|Cisco Investments Ltd|INSEAD MBA;Virginia Polytechnic Institute & State University Master's Degree, Computer Science;State University of New York Master's Degree, Computer Science\n",
      "20\n",
      "Su Xingwang|Vice President|Guangzhou Port Co Ltd|South China University of Technology Master's Degree\n",
      "Su Xingwang|Vice President|Guangzhou Port Co Ltd|South China University of Technology Master's Degree\n",
      "Todd Wright|Managing Director:Bus Dev|Lowe Brockenbrough & Co Inc|Virginia Commonwealth University Bachelor's Degree, Economics\n",
      "Zhang Nai|Vice President|Julong Co Ltd|Northeastern University MBA\n",
      "30\n",
      "Cho Lien-Tai|Chief Strategy Officer|Ever-Clear Environmental Eng Corp|National Cheng Kung University Doctorate Degree\n",
      "Rick Will|Founding Partner|Legend Partners Ltd|University of Denver MBA, Finance, 1985;University of Colorado Bachelor's Degree, Economics, 1982\n",
      "Bryce Doherty|CEO/Mng Dir/Head:Australia|UBS Asset Management Australia Ltd|LA Trobe University Bachelor's Degree, Commerce\n",
      "Lim Jin Aun|Head:Communications & Strategic Mktg|Prasarana Malaysia BHD|University of Malaya Master's Degree, Management;Universiti Sains Malaysia Bachelor's Degree, Communications\n",
      "Xu Zhong Qi|Deputy General Manager|Sinofert Holdings Ltd|Tsinghua University MBA, 2013;China Youth University for Political Sciences Graduated;Beijing Normal University Bachelor's Degree;Beijing Normal University Master's Degree\n",
      "40\n",
      "50\n",
      "Krishna Jhaveri|Executive Director|Sasken Technologies Ltd|University of Texas at Austin/The Master's Degree, 1983;Maharaja Sayajirao University of Baroda/The Bachelor's Degree, 1978\n",
      "Amy Tang|Venture Partner|Qiming Weichuang Venture Capital Management Shanghai Co Ltd|Shen Yang Pharmaceuticals College Master's Degree;Shen Yang Pharmaceuticals College Bachelor's Degree;Cheung Kong Graduate School of Business Graduated\n",
      "Jun Kinebuchi|Chairman|Qiming Weichuang Venture Capital Management Shanghai Co Ltd|Keio University Master's Degree, Business Administration\n",
      "Luciano Balbo|Chairman/Founder|Oltre Venture DI Oltre Gestioni Srl Sapa|Universita DI Milano Graduated, Physics;Universita Commerciale Luigi Bocconi MBA\n",
      "Wang Lihua|Vice President|Beijing Wkw Automotive Parts Co Ltd|Jiangxi University of Finance & Economics MBA\n",
      "Kelly Greene|President:Urban Legend|Legend Partners Ltd|University of Colorado Bachelor's Degree, Political Science, 1974\n",
      "60\n",
      "Todd Bennett|Senior VP:Global Sales & Customer|Luminex Corp|Ohio State University Bachelor's Degree, Business Administration\n",
      "Ulf Sidemo|Mng Dir:Sweden & UK|Valtech SE|University of Gothenburg Master's Degree;University of Gothenburg MBA\n",
      "Anne Cathrine Wilhjelm|Partner|Seed Capital Denmark|Vrije University Amsterdam LLM, 1995-1996;University of Copenhagen\n",
      "Ankur Saxena|Manager|Cisco Investments Ltd|Northwestern University MBA;Indian Institute of Technology/Kanpur Bachelor's Degree, Electrical Engineering\n",
      "Zhou Chengzu|Vice President|Xiamen Meiya Pico Information Co Ltd|Beijing Jiaotong University Graduated\n",
      "Chang Hsiang-Chi|President|Ever-Clear Environmental Eng Corp|National Cheng Kung University Master's Degree\n",
      "70\n",
      "Song Xiaoming|Vice President|Guangzhou Port Co Ltd|South China Normal University Bachelor's Degree;Jinan University Master's Degree\n",
      "Steven Hooi|CEO:Property & Construction|Prg Holdings BHD|University Kebangsaan Malaysia Bachelor's Degree, Engineering\n",
      "Sze Wai Lun|Executive Director|Winson Holdings Hong Kong Ltd|Griffith University Bachelor's Degree, Commerce, 12/2006\n",
      "80\n",
      "Kate Svoboda|Chief Human Resources Officer|Genworth Mortgage Insurance Australia Ltd|University of New England Master's Degree, Business Administration;University of Queensland Bachelor's Degree\n",
      "Sadamu Konishi|Director|Wavelock Holdings Co Ltd|University of Tokyo Bachelor's Degree, Literature, 3/1963\n",
      "Khairani Mohamed|CEO:Prasarana Rail & Infrastructure Projects|Prasarana Malaysia BHD|Mississippi State University Bachelor's Degree, 1986\n",
      "Sze Tan Nei|Executive Director|Winson Holdings Hong Kong Ltd|Queensland University of Technology Bachelor's Degree, Business, 10/2004\n",
      "90\n",
      "Helle Uth|Manager:Investment|Seed Capital Denmark|Aarhus University Master's Degree\n",
      "Malai Mahamnirat|Director: Nursing|Thonburi Medical Center PCL|MBA\n",
      "Li Guosheng|Vice Chairman|Beijing Starneto Technology Co Ltd|Associate's Degree\n",
      "Li Guosheng|Vice Chairman|Beijing Starneto Technology Co Ltd|Associate's Degree\n",
      "Ezwan Hazli Malek|Chief Strategy & Transformation Ofcr|Prasarana Malaysia BHD|University of Queensland Graduated, Commerce\n",
      "100\n",
      "Daniel Fischer|Manager|Cisco Investments Ltd|University of Chicago Bachelor's Degree, Economics;President & Fellows of Harvard College MBA\n",
      "Bart Goedseels|Chief Operating Officer|Option NV|Katholieke Universiteit TE Leuven Graduated, Law\n",
      "Scott Munger|Chief Operating Officer|Highwinds Network Group Inc|University of Colorado Bachelor's Degree, Computer Science\n",
      "110\n",
      "Gerald Leahy|Chief Financial Officer|Pharmagap Inc|Carleton University Bachelor's Degree, Commerce\n",
      "120\n",
      "Ma Chujiang|Secretary/Chief Officer|Guangzhou Port Co Ltd|South China University of Technology MBA;Ocean University of China Bachelor's Degree\n",
      "Keren Kopilov|Chief Financial Officer|Firsttime Ventures|Hebrew University of Jerusalem Bachelor's Degree;Tel Aviv University MBA;Tel Aviv University LLB\n",
      "Blake Skinner|Partner|Legend Partners Ltd|Tulane University JD, 1994;University of Michigan Bachelor's Degree, 1991\n",
      "130\n",
      "Mohd Osman|Head:Gen Cnsl & Secretarial Department|Prasarana Malaysia BHD|University Kebangsaan Malaysia LLB\n",
      "Nina Hein|Manager:Transaction|Legend Partners Ltd|Ohio State University - Chillicothe Bachelor's Degree, 2006\n",
      "Kjell Johansson|Pres:Manufact Service Europe|Recipharm AB|Lund Institute of Technology Master's Degree;Stockholm University Bachelor's Degree, Economics\n",
      "140\n",
      "David Sanderlin|Dir:Information Technology|Lowe Brockenbrough & Co Inc|Old Dominion University Bachelor's Degree\n",
      "Waldir Chao|Dir:Leasing & Operations|Sonae Sierra Brasil SA|Polytechnic School of The Univ Graduated, Engineering;California State University Long Beach MBA\n",
      "Kate-Lynn Genzel|Chief Financial Officer|Alderon Iron Ore Corp|University of British Columbia Bachelor's Degree\n",
      "John Mack|Co-Vice Chairman/Gen Partner|Bkm Capital Partners LP|Duke University Bachelor's Degree, History, 1968\n",
      "150\n",
      "Malcolm Thornton|Manager|Cisco Investments Ltd|Melbourne Business School Master's Degree, Business Administration;Melbourne Business School Bachelor's Degree;Queensland University of Technology Master's Degree\n",
      "Magnus Carlstrom|SVP:Human Resources|Granges AB|Uppsala Universitet Master's Degree, Law;Uppsala Universitet Graduated, Psychology;Stockholm School of Economics MBA\n",
      "Natcha Argasreog|Senior Vice President|KASIKORNBANK PCL|Chulalongkorn University MBA\n",
      "Peter Egehoved|Manager:Investment|Seed Capital Denmark|University of Pennsylvania MBA;Copenhagen Business School Graduated, Business Administration\n",
      "160\n",
      "Kwon Jung-Won|Vice President|S&T Dynamics Co Ltd|Seoul National University\n",
      "Kyle Underwood|Partner|Legend Partners Ltd|University of Kansas Bachelor's Degree, 2000\n",
      "170\n",
      "Shara Tanatarova|Dpty Gen Dir:Dev & Assets|Legend Partners Ltd|University of Massachusetts Master's Degree, Business Administration, 2002;University of Massachusetts Graduated, 2000\n",
      "Gabe Miller|Chief Financial Officer|Highwinds Network Group Inc|University of Florida Bachelor's Degree, Business Administration;University of Florida Master's Degree, Business Administration\n",
      "Jane Lightfoot|Vice President|Oxbow Advisors LLC|Texas State University Bachelor's Degree\n",
      "180\n",
      "Ari Jarvela|EVP:New Data-Driven Business|Tieto OYJ|Master's Degree, Engineering\n",
      "Geri House|Exec VP:People & Organisation|National Cinemedia Inc|Simon Fraser University Bachelor's Degree;President & Fellows of Harvard College JD\n",
      "190\n",
      "Sarah Grobler|Secretary|Alviva Holdings Ltd|Bachelor's Degree, Commerce\n",
      "Ang Ming Wah|Executive Director|Winson Holdings Hong Kong Ltd|University of Michigan 1997;University of Waterloo Bachelor's Degree, 10/1979;University of Waterloo Bachelor's Degree, Mathematics, 10/1978\n",
      "Andrea Chiapponi|Chief Commercial Officer|Italiaonline Spa|Politecnico DI Milano Graduated, Engineering\n",
      "200\n",
      "Vin Lingathoti|Manager|Cisco Investments Ltd|University of Pennsylvania MBA;University of Potsdam Master's Degree, Computer Science\n",
      "210\n",
      "Saripuddin Bin Kasim|Secretary-General|Cisco Investments Ltd|University of Hartford MBA\n",
      "Kao Chin-Lan|Division:Financial|Air Asia Co Ltd|University of San Francisco Master's Degree, Finance\n",
      "Anne Flockart|Mng Dir/Head:Institutional|UBS Asset Management Australia Ltd|University of Melbourne Bachelor's Degree\n",
      "Michael Smith|Co-President|Johnson Development LLC|Texas A&M University Bachelor's Degree;University of Houston Foundation Master's Degree, Business Administration\n",
      "Michael Misoyianis|Chief Financial Officer|William Mills Agency|West Virginia University College of Business & Economics Bachelor's Degree, Business Administration\n",
      "220\n",
      "Wu Mei-Chen|Director:Accountant|Ever-Clear Environmental Eng Corp|National Taipei University Bachelor's Degree, Accounting\n",
      "Lior Som|CEO/CFO|Emilia Development Ltd|University of Haifa Bachelor's Degree;University of Haifa MBA\n",
      "Punsiri Suttienkul|Director|Tipco Asphalt PCL|Silpakorn University Bachelor's Degree, Agriculture;University of Pennsylvania Master's Degree\n",
      "Michael O'Connor|Vice President|Feg Private Investors LLC|University of Cincinnati Bachelor's Degree, Business Administration\n",
      "Anders Kjaer Christensen|Manager:Investment|Seed Capital Denmark|Aarhus University Master's Degree\n",
      "230\n",
      "Leonid Kaprov|Senior VP/Chief Commercial Ofcr|Hals-Development Pjsc|Moscow State Social University Graduated, 1998;Russian Presidential Academy of National Economy & Public Administration\n",
      "Mark Quick|EVP:Corporate Development|Recipharm AB|Open University MBA, 2005;Nottingham Trent University Bachelor's Degree, 1988\n",
      "Aby Galsky|Managing Partner/Co-Founder|Sefira Capital LLC|Universidad de Lima Bachelor's Degree, Business Administration;University of California San Francisco Foundation MBA\n",
      "Reta Baker|President|Mercy Hospital Fort Scott|Missouri Southern State University Bachelor's Degree;University of Minnesota Master's Degree\n",
      "Scott Stofferahn|Exec VP/CEO/CFO|Golden Growers Coop|North Dakota State University of Agriculture & Applied Science Bachelor's Degree\n",
      "240\n",
      "David Larson|Founding Partner|Legend Partners Ltd|University of Denver Bachelor's Degree, 1982\n",
      "Sean Charnock|President|WS Live LLC|University of North Florida Bachelor's Degree, Finance;Regis University MBA, Finance\n",
      "Kogan Bao|VP:Analytical Sciences|Oncobiologics Inc|Oregon State University PhD, Biochemistry\n",
      "Chris Wiedenmayer|VP:Legend Investments|Legend Partners Ltd|Hobart College Bachelor's Degree, 1996\n",
      "Hitesh Saijpal|Director|Cisco Investments Ltd|Santa Clara University MBA;The University of Texas System Master's Degree, Electrical Engineering;University of Mumbai Bachelor's Degree\n",
      "Eric Rhine|Manager|Cisco Investments Ltd|Princeton University Bachelor's Degree\n",
      "250\n",
      "Suphat Pipitawan|Director:Operation|Tipco Asphalt PCL|King Mongkut's Institute of Technology Engineering\n",
      "Roland Baumgartner|Chief Scientific Officer|4sc AG|Max Planck Institute of Biochemistry PhD;University of Regensburg Graduated, Biology\n",
      "260\n",
      "Marc Esposito|VP:Crew & Values Relations|Jetblue Airways Corp|Emory University School of Law Graduated;University of Rochester Graduated\n",
      "Jose Miguel Del Solar Concha|Dir:Human Resources|Cristalerias de Chile SA|Universidad de Chile Bachelor's Degree, Engineering\n",
      "Jarkko Sairanen|EVP:Bus Area Weather|Vaisala OYJ|INSEAD MBA, 1991;Helsinki University of Technology Master's Degree, 1988\n",
      "Geoff Neate|Managing Director/Co-Founder|Spirit Telecom Ltd|Monash University Bachelor's Degree, Business\n",
      "Prasad Parthasarathi|Manager|Cisco Investments Ltd|Indian School of Business MBA, Finance;Duke University\n",
      "270\n",
      "Beltran Zarco|Chief Financial Officer|Iba Capital Partners SL|European Business School Bachelor's Degree, Business Administration\n",
      "Zohari Sulaiman|CEO:Rapid Rail|Prasarana Malaysia BHD|Liverpool John Moores University Bachelor's Degree\n",
      "Rollin Kocher|Senior VP:Commercial Operations|Nanometrics Inc|University of North Texas Bachelor's Degree, Electrical Engineering\n",
      "280\n",
      "Gerald Cox|Chief Medical Officer|Editas Medicine Inc|President & Fellows of Harvard College Bachelor's Degree;University of California San Francisco Foundation MD;University of California San Francisco Foundation PhD\n",
      "Qing Jiu|Vice Chairman/Exec VP|Nantong Acetic Acid Chemical Co Ltd|Bachelor's Degree;MBA\n",
      "John Purcell|Partner|Arent Fox LLP|New York University School of Law JD, 1991;University of Illinois Bachelor's Degree, 1986\n",
      "Sam Zaitz|Partner|Legend Partners Ltd|Colorado State University System Bachelor's Degree, Finance, 2003\n",
      "Chanchai Lohapratarn|Dir:Domestic Sales&Marketing|Tipco Asphalt PCL|Prince of Songkla University Bachelor's Degree, Science\n",
      "290\n",
      "Melanie Leydin|Secretary|Spirit Telecom Ltd|Swinburne University of Techno Graduated, 1997\n",
      "Attapan Boonta|Manager:Accounting&Finance|Thonburi Medical Center PCL|Ramkhamharng University MBA\n",
      "Susie Sedlacek|Senior VP:Global Professional Svcs|Financialforce.Com Inc|University of San Francisco MBA;University of San Francisco Bachelor's Degree, Economics\n",
      "Larry Johnson|Chairman/CEO|Johnson Development LLC|Texas Tech University Graduated\n",
      "300\n",
      "Richard Charest|President/CEO|Rehabilitation Hospital of Rhode Island|Northeastern University Bachelor's Degree, Pharmacy;Bryant University MBA\n",
      "Cui Wenhua|Former Vice Chairman/VP/Secretary|Julong Co Ltd|Master's Degree\n",
      "310\n",
      "Noam Herrmann|Head:Operations|Ion Asset Management Ltd|Yeshiva University Bachelor's Degree;Kellogg-Recanati MBA\n",
      "320\n",
      "Weerawat Kiattipongthaworn|Chief Operating Officer|Advanced Info Service PCL|University of Michigan Master's Degree, Engineering;Thammasat University MBA\n",
      "Daniel Shapira|Internal Auditor|Itay Financial A.A Investments Ltd|Bar-Ilan University Bachelor's Degree\n",
      "330\n",
      "Drew Fowler|Dir:Institutional Business|UBS Asset Management Australia Ltd|Queen's University Bachelor's Degree\n",
      "Anchalee Sahakijpijarn|Manager:Inspectors Nursing|Thonburi Medical Center PCL|Mahidol University Bachelor's Degree\n",
      "Zulkifli Yusoff|CEO:Rapid Bus SDN/Dir:Bus|Prasarana Malaysia BHD|University of Salford Bachelor's Degree\n",
      "Adinun Kittiratanapaibool|Director:Hospitol|Thonburi Medical Center PCL|Chulalongkorn University Bachelor's Degree, Medicine\n",
      "340\n",
      "Shaharom Abd Manap|Chief Integrity Officer|Prasarana Malaysia BHD|University Kebangsaan Malaysia\n",
      "Xu Kefeng|Vice President|Shandong Luyitong Intelligent Electric PLC|Chongqing University Graduated\n",
      "Sameer Rizvi|Managing Partner|RD Capital Partners LLP|Mcgill University Bachelor's Degree\n",
      "Mijael Attias|Managing Partner/Co-Founder|Sefira Capital LLC|Ipade Business School MBA\n",
      "Ho Chia-Ching|Chairman|Ever-Clear Environmental Eng Corp|National Cheng Kung University Master's Degree\n",
      "James Duck|Dir:Institutional Business|UBS Asset Management Australia Ltd|University of Sydney Bachelor's Degree\n",
      "350\n",
      "Li Suwen|CEO/Executive Director/Co-Founder|Wisdom Education International Holdings Co Ltd|Peking University Master's Degree, 3/2004\n",
      "Divya Venkatachari|Manager|Cisco Investments Ltd|Anna University Bachelor's Degree, Computer Science;Johns Hopkins University Master's Degree, Computer Science;University of Pennsylvania MBA\n",
      "Divya Venkatachari|Manager|Cisco Investments Ltd|Anna University Bachelor's Degree, Computer Science;Johns Hopkins University Master's Degree, Computer Science;University of Pennsylvania MBA\n",
      "Doug Goff|Co-President|Johnson Development LLC|Louisiana State University System Bachelor's Degree;Purdue University Master's Degree, Management\n",
      "360\n",
      "Josh Gagliardi|Chief Technology Officer|Highwinds Network Group Inc|Massachusetts Institute of Technology Bachelor's Degree, Computer Science\n",
      "Shin Kyung-In|Senior Managing Director|S&T Corp|Korea University Graduated\n",
      "Yan Chiu|Executive Director|Wanjia Group Holdings Ltd|Hong Kong University of Science & Technology/The Master's Degree, 2012;City University of Hong Kong Bachelor's Degree, Business Administration, 1999\n",
      "Robbin Haydon|VP/Mgr:Client Service|Lowe Brockenbrough & Co Inc|University of Richmond Bachelor's Degree, Finance\n",
      "370\n",
      "Thomas Beck|SVP:Quality Management|Recipharm AB|Uppsala Universitet Master's Degree, Science\n",
      "Olen Aasen|Secretary/General Counsel|Alderon Iron Ore Corp|University of British Columbia/The JD\n",
      "380\n",
      "Paul Neutjens|SVP:Process ENG & Operat Dvlpmt|Granges AB|Master's Degree, Science\n",
      "Christopher Burton|Founding Partner|Legend Partners Ltd|Texas A&M University Bachelor's Degree, Marketing, 1983\n",
      "Qian Xiaofeng|Former Controller|Brother Enterprises Holding Co Ltd|Associate's Degree\n",
      "Rich Day|Chief Architect|Highwinds Network Group Inc|Parsons The New School for Design Bachelor's Degree;New York University\n",
      "Sean Fitzpatrick|Exec VP:Operations|Lexisnexis|University of Michigan MBA\n",
      "Victoria Kruglova|Senior VP/CFO/Member-Mgmt Board|Hals-Development Pjsc|GV Plekhanov Rissian Economic Academy Graduated, 2003\n",
      "Alan Chelko|Manager|Cisco Investments Ltd|Thunderbird School of Global Management MBA, 1996;Arizona State University MBA\n",
      "390\n",
      "Andrea Fascetti|Chief Human Resources Officer|Italiaonline Spa|Universita Commerciale Luigi Bocconi Graduated, Economics, 1990\n",
      "Cem Miralay|Chief Customer Ofcr|William Hill PLC|Syracuse University Bachelor's Degree\n",
      "Christophe Arbet-Engels|Chief Medical Officer|Poxel SA|Paris - Sorbonne University MD;Univ Paris V Rene Descartes PhD;Rutgers University Foundation Master's Degree, Business Administration\n",
      "400\n",
      "Tarek Aboualam|Chairman|Poxel SA|Alexandria University Bachelor's Degree\n",
      "Fuzail Ahmad|Partner|RD Capital Partners LLP|University of Pennsylvania\n",
      "410\n",
      "Iryna Dubylovska|Senior Partner|RD Capital Partners LLP|Kings College Bachelor's Degree;University College London Master's Degree, Economics\n",
      "Jack Ren|Manager|Cisco Investments Ltd|Yale School of Management MBA;Tsinghua University PhD\n",
      "Mads Klarskov Petersen|Director:Talent|Seed Capital Denmark|CBS Bachelor's Degree\n",
      "Snehal Patel|Chairman/Interim Compliance Officer|Oasis Tradelink Ltd|Bachelor's Degree, Engineering\n",
      "Martin Semple|Chairman|Denver Center for The Performing Arts/The|St Patrick's College Graduated;University of Denver Sturm College of Law JD, Law;Catholic University of America/The Doctorate Degree, Law\n",
      "420\n",
      "Zhang Jianhua|VP/HEAD：SALES|Chengdu Shenleng Liquefaction Plant Co Ltd|Hunan University Graduated\n",
      "Hideaki Yajima|Manager|Cisco Investments Ltd|Massachusetts Institute of Technology MBA;University of Tokyo Bachelor's Degree, Engineering;University of Tokyo Master's Degree, Engineering\n",
      "Li Yibo|President|Guangzhou Port Co Ltd|South China University of Technology Bachelor's Degree\n",
      "Christophe Voy|COO:Intl Retail|Tipco Asphalt PCL|Sdsu Business Administration\n",
      "430\n",
      "Frank Hermann|Chief Development Officer|4sc AG|University of Mainz MD\n",
      "Bruce Meadows|Partner|MD Start SA|University of Queensland Bachelor's Degree;International Institute for Management Development MBA\n",
      "Ma Suying|Principal:Finance|Guangzhou Port Co Ltd|Jiangxi University of Finance & Economics Bachelor's Degree;Jinan University MBA\n",
      "440\n",
      "Brian Miller|Chief Commercial Officer|DS Services of America Inc|State University of New York Graduated\n",
      "Martin Haislund Andersen|Manager:Finance|Seed Capital Denmark|Copenhagen Business School Bachelor's Degree\n",
      "Svein Tore Samdal|Exec Dir:Retail Banking|Sparebank 1 Smn|Norwegian University of Scienc Master's Degree, Political Science, 1999\n"
     ]
    }
   ],
   "source": [
    "#!/user/bin/env python\n",
    "# coding:utf-8\n",
    "\n",
    "#Parse items into ceo_list\n",
    "\n",
    "import selenium\n",
    "import time\n",
    "from selenium import webdriver\n",
    "import glob\n",
    "files = glob.glob('/home/guan/Data/ceo_education/ceo_pages/1_10000/*.html')\n",
    "\n",
    "phantomjs_path = '/home/guan/Software/phantomjs-2.1.1-linux-x86_64/bin/phantomjs'\n",
    "outfile = open('/home/guan/Data/ceo_education/ceo_education_sample.csv', 'w')\n",
    "ds = webdriver.PhantomJS(executable_path=phantomjs_path)\n",
    "print >> outfile, 'name|title|company|education'\n",
    "for n, file_name in enumerate(files):\n",
    "    if n % 10 == 0:\n",
    "        print n\n",
    "    ds.get(file_name)\n",
    "    education = ''\n",
    "    try:\n",
    "        education = ds.find_element_by_xpath('//div[@class=\"education first last section\"]')\n",
    "    except:\n",
    "        continue\n",
    "    education_results = education.find_elements_by_xpath('.//ul[@class=\"records\"]/li')\n",
    "    edu_str = ''\n",
    "    for item in education_results:\n",
    "        edu_str = edu_str + ';' + item.text\n",
    "    edu_str = edu_str.strip(';')\n",
    "    header = ds.find_element_by_xpath('//div[@class=\"header\"]')\n",
    "    try:\n",
    "        ceo_name = header.find_element_by_xpath('.//h1[@class=\"name\"]').text\n",
    "    except:\n",
    "        continue\n",
    "    ceo_title = ''\n",
    "    try:\n",
    "        ceo_title = header.find_element_by_xpath('.//div/h2').text.strip(',')\n",
    "    except:\n",
    "        pass\n",
    "    ceo_company = ''\n",
    "    try:\n",
    "        ceo_company = header.find_element_by_xpath('.//div/a').text\n",
    "    except:\n",
    "        pass\n",
    "    \n",
    "    strtmp = ceo_name + '|' + ceo_title + '|'  + ceo_company + '|' + edu_str\n",
    "    print strtmp\n",
    "    print >> outfile, strtmp.encode('utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Al Majali.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Al Baz.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah M Habadi.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Bukhari.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Yaprakci.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Ali Al Turaiki.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Hamdan Al Zorqi.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Yigitbasi.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Can.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Cortu.html\n",
      "/home/guan/Data/ceo_education/ceo_pages/test/Abdullah Abdul Rahman Al Kanhal.html\n"
     ]
    }
   ],
   "source": [
    "from bs4 import BeautifulSoup\n",
    "import glob\n",
    "import json\n",
    "import collections\n",
    "files = glob.glob('/home/guan/Data/ceo_education/ceo_pages/test/*.html')\n",
    "outfile = open('/home/guan/Data/ceo_education/ceo_pages/ceo_dicts/ceo_dicts', 'w')\n",
    "\n",
    "for html_file in files:\n",
    "    print html_file\n",
    "    ceo_dic = collections.OrderedDict()\n",
    "    html = open(html_file)\n",
    "    soup = BeautifulSoup(html,'html.parser',from_encoding='utf-8')\n",
    "    name = soup.find('h1', {'class': 'name'}).text.strip()\n",
    "    #print name.text\n",
    "    if name == '':\n",
    "        continue\n",
    "    ceo_dic[u'name'] = name\n",
    "    title = soup.find('h2', {'class': 'title'})\n",
    "    #print title.text\n",
    "    ceo_dic[u'title'] = title.text.strip(',')\n",
    "    company = title.find_next('a').text\n",
    "    #print company\n",
    "    ceo_dic[u'company'] = company.strip()\n",
    "    \n",
    "    \n",
    "    records = soup.find_all('h2', {'class': 'module_title'})\n",
    "    for record in records:\n",
    "        #ceo_dic[record.text.strip()] = []\n",
    "        #print record.text.strip()\n",
    "        #print '================='\n",
    "        items = record.find_next_siblings('div')\n",
    "        item_content = []\n",
    "        for item in items:\n",
    "            if item.text.strip() != '':\n",
    "                item_content.append(item.text.strip())\n",
    "            \n",
    "            #print '+++++++++++++++'\n",
    "        if item_content != []:\n",
    "            ceo_dic[record.text.strip()] = item_content\n",
    "    html.close()\n",
    "    #print ceo_dic\n",
    "    print >> outfile, json.dumps(ceo_dic.items()) \n",
    "    #print >> outfile, json_format\n",
    "\n",
    "\n",
    "outfile.close()\n",
    "        \n",
    "    \n",
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
